<?php
namespace Admin\Controller;
use Think\Controller;
class CommonController extends Controller {
    
    public function _initialize()
    {

        if($_SESSION['username']!='admin'){

            $rule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME);

            $Auth  =  new \Think\Auth();

            if(!$Auth->check($rule,$_SESSION['id'])){
                $this->error('你还没有权限，请先联系管理员开通',U('admin/login/index')); 
            }
        }
    	
    }

    public function log($who,$actoin)
    {
       // $sql INdexdfsdfsdfsdfsdf

       // sdfsdf
    }

}

